﻿using System;
using System.Collections.Generic;

using Model.Cms;
namespace IDAL.Cms
{
    /// <summary>
    /// 接口层，内容管理，广告
    /// </summary>
    public interface INews
    {
        /// <summary>
        /// 新增新闻
        /// </summary>
        /// <param name="info"></param>
        /// <returns></returns>
        bool InsertNews(NewsInfo info);
        /// <summary>
        /// 修改新闻
        /// </summary>
        /// <param name="info"></param>
        /// <returns></returns>
        bool UpdateNews(NewsInfo info);
        /// <summary>
        /// 获取新闻
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        NewsInfo GetNewsByID(int id);
        /// <summary>
        /// 新闻列表
        /// </summary>
        /// <param name="condition"></param>
        /// <returns></returns>
        IList<NewsInfo> ListNews(NewsCondition condition);
        /// <summary>
        /// 新闻列表
        /// </summary>
        /// <param name="condition"></param>
        /// <param name="recordCount"></param>
        /// <returns></returns>
        IList<NewsInfo> ListNews(NewsCondition condition, out int recordCount);
    }
}
